package pub.consumer;

import com.rpc.user.IUserInfo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * Created by IntelliJ IDEA.
 * User: kui.zhang
 * Date: 2017/8/1
 * Time: 14:59
 * To change this template use File | Settings | File Templates.
 */
@Controller
@RequestMapping("hello")
public class UserController {
    private Logger logger = LoggerFactory.getLogger(UserController.class);
    @Resource
    private IUserInfo userInfo;

    @RequestMapping("say")
    @ResponseBody
    public String sayhello() {
        String str = "hello";
        str = userInfo.hello("kui.zhang");
        logger.info("info ->>{}", str);
        return str;
    }
}
